package dnl.jexem.cmd;

/**
 * Enumeration of the various possible termination reasons.
 *
 * @author Daniel Orr
 */
public enum TerminationReason {

    /**
     * The command was not found. This is a pre execution issue, which mean the command did not even start.
     */
    COMMAND_NOT_FOUND,
    
    /**
     * Was not able to start the underlying process.
     */
    CANNOT_CREATE_PROCESS,
    
    /**
     *
     */
    CANNOT_CREATE_LOCAL_SCRIPT,
    /**
     * The working directory does not exist. This is a pre execution issue, which mean the command did not
     * even start.
     */
    WORK_DIR_DOES_NOT_EXIST,

    /**
     * The command was executed and terminated with exit code 0.
     */
    COMPLETED_SUCCESSFULY,
    
    /**
     * The command was executed and terminated with exit code other than 0.
     */
    ABNORMAL_TERMINATION,
    
    /**
     * The command was executed and 'killed' after the timeout has passed.
     */
    KILLED_AFTER_TIMEOUT,
    
    /**
     * Command's process was killed.
     */
    KILLED

}
